<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="com.yaodian100.crm.workflow.entity.WorkFlowNode" %>
<%@taglib uri="/WEB-INF/tld/pageutil.tld" prefix="pu"%>
<%@taglib uri="/WEB-INF/tld/pageable.tld" prefix="pageable"%>
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>
<%@taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt-rt"%>
<script>
var content;
</script>
<c-rt:set var="tp" value="${pu:pageableTag('tpp', 50, 10)}"/>
${pu:criteriaForName('com.yaodian100.crm.workorder.entity.TaskGroup') }
${pu:criteriaAddOrder(pu:criteriaOrderDesc('createDate')) }
<c-rt:set var="groups" value="${pu:criteriaResult(tp)}"/>
<table class="tb-data" width="100%">
<thead>
<tr>
<th>&nbsp;</th>
<th>处理部门</th>
<th>通知窗口</th>
<th>行事历类别</th>
<th>修改人员</th>
<th>修改日期</th> 
</tr>
</thead>
<tbody>
<c-rt:forEach items="${groups}" var="group">

<tr>
<td>
<c-rt:set var="gcw" value="${pu:get('com.yaodian100.crm.cs.entity.GroupContactWindow', group.id)}"/>
<input type="button" value="删除" onclick="if(confirm('確定刪除？'))doAR('<%=application.getContextPath()%>/cs/contactWindow/delete.do?id=${group.id }&AJAX=true', 'main')"/>
<input type="button" value="编辑" onclick="doAR('<%=application.getContextPath() %>/cs/contactWindow/page.do?iamlazy=updateContactWindow&id=${group.id}','dialog');openDialog('修改通知窗口', content, 500, 500)"/>
<input type="button" value="顯示" onclick="doAR('<%=application.getContextPath() %>/cs/contactWindow/page.do?iamlazy=view&id=${group.id}','dialog');openDialog('通知窗口', content, 500, 500)"/>

</td>
<td>${group.name }</td>
<td>${gcw.name }</td>
<td>
<c-rt:if test="${!empty gcw.holidayId}">
${pu:menuOption('WorkOrderHoliday.class', gcw.holidayId).name }
</c-rt:if>
</td>
<td>${gcw.modifyUser }</td>
<td><fmt-rt:formatDate value="${gcw.modifyDate }" pattern="yyyy/MM/dd HH:mm"/></td>
</tr>
</c-rt:forEach>
</tbody>
</table>
<c-rt:set var="url">
<%=application.getContextPath() %>/cs/contactWindow/page.do
</c-rt:set>
<pageable:Pageable url="${url}" formname="contactWindowForm" escapeparams="AJAX,refreshZone,iamlazy" parameter="iamlazy=list&AJAX=true&refreshZone=main" key="tpp"></pageable:Pageable>